<template>
  <div class="goods-spec">
    <goods-cell title="规格：" @click.native="updateGoodsSpec">
      <span>{{choose_sku.sku_name}}</span>
    </goods-cell>
  </div>
</template>

<script type="text/ecmascript-6">
import goodsCell from './common/goods-cell'
import goodsSpecPanel from './goods-spec-panel'
export default {
  components: {
    goodsCell,
    goodsSpecPanel
  },
  props:['sku_list','choose_sku'],
  methods: {
    updateGoodsSpec () {
      this.$mPopup({
        mask: true
      }, (h) => {
        return h(goodsSpecPanel, {
          on: {
            change: this.changeHandler
          },
          props:{'choose_sku':this.choose_sku,'sku_list':this.sku_list}
        })
      })
    },
    changeHandler(sku){
      this.$emit('change',sku);
    }
  }
}
</script>

<style lang="less" scoped>
  .goods-spec{
    padding: 10px;
    margin-bottom:20px;
    background: white;
  }
</style>
